home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Source Code / Half-Life Model Viewer / src / pakviewer.h < prev    next >
C/C++ Source or Header  |  1999-05-04  |  2KB  |  92 lines

  1. //
  2. //                 Half-Life Model Viewer (c) 1999 by Mete Ciragan
  3. //
  4. // file:           pakviewer.h
  5. // last modified:  Apr 28 1999, Mete Ciragan
  6. // copyright:      The programs and associated files contained in this
  7. //                 distribution were developed by Mete Ciragan. The programs
  8. //                 are not in the public domain, but they are freely
  9. //                 distributable without licensing fees. These programs are
  10. //                 provided without guarantee or warrantee expressed or
  11. //                 implied.
  12. //
  13. // version:        1.2
  14. //
  15. // email:          mete@swissquake.ch
  16. // web:            http://www.swissquake.ch/chumbalum-soft/
  17. //
  18. #ifndef INCLUDED_PAKVIEWER
  19. #define INCLUDED_PAKVIEWER
  20.  
  21.  
  22.  
  23. #ifndef INCLUDED_MXWINDOW
  24. #include <mx/mxWindow.h>
  25. #endif
  26.  
  27.  
  28.  
  29. #define IDC_PAKVIEWER        1001
  30.  
  31.  
  32.  
  33. typedef struct
  34. {
  35.     char name[56];
  36.     int filepos;
  37.     int filelen;
  38. } lump_t;
  39.  
  40.  
  41.  
  42. #ifdef __cpluspus
  43. extern "C" {
  44. #endif
  45.  
  46. int pak_ExtractFile (const char *pakFile, const char *lumpName, char *outFile);
  47.  
  48. #ifdef __cpluspus
  49. }
  50. #endif
  51.  
  52.  
  53.  
  54. class mxTreeView;
  55. class mxButton;
  56. class mxPopupMenu;
  57. class GlWindow;
  58.  
  59.  
  60.  
  61. class PAKViewer : public mxWindow
  62. {
  63.     char d_pakFile[256];
  64.     char d_currLumpName[256];
  65.     bool d_loadEntirePAK;
  66.     mxTreeView *tvPAK;
  67.     mxPopupMenu *pmMenu;
  68.  
  69. public:
  70.     // CREATORS
  71.     PAKViewer (mxWindow *window);
  72.     ~PAKViewer ();
  73.  
  74.     // MANIPULATORS
  75.     virtual int handleEvent (mxEvent *event);
  76.     int OnPAKViewer ();
  77.     int OnLoadModel ();
  78.     int OnLoadTexture (int pos);
  79.     int OnPlaySound ();
  80.     int OnExtract ();
  81.  
  82.     bool openPAKFile (const char *pakFile);
  83.     void closePAKFile ();
  84.     void setLoadEntirePAK (bool b) { d_loadEntirePAK = b; }
  85.  
  86.     // ACCESSORS
  87.     bool getLoadEntirePAK () const { return d_loadEntirePAK; }
  88. };
  89.  
  90.  
  91.  
  92. #endif // INCLUDED_PAKVIEWER